Combine ColNames and mapping dictionary #245#253
Combine ColNames and mapping dictionary #245#253FedericoTartarini merged 1 commit intoCenterForTheBuiltEnvironment:developmentfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @FedericoTartarini, I’ve addressed the request in issue#245 by refactoring the ColNames and mapping_dictionary into the unified Variables and VariableInfo structure. |
430f5c2
into
CenterForTheBuiltEnvironment:development
Summary
This PR addresses and resolves open issue #245 by unifying the previously separate
ColNamesclass andmapping_dictionaryinto a single, consistent data structure. A newVariableInfodataclass has been introduced (with SI/IP unit support), and aVariablesclass now holds all variable metadata. All references tomapping_dictionaryand hard-coded string column names have been replaced with the newVariables/VariableInfostructure for improved readability and maintainability.Changes
VariableInfodataclass to store column metadata (col_name, name, unit, range, color, and SI/IP overrides).Variablesclass to hold allVariableInfoinstances (formerly ColNames).mapping_dictionaryentirely and updated all code that relied on it to useVariableInfomethods instead (e.g. get_name(), get_unit(), get_range()).Variables.<VAR>.col_nameacross dropdowns, charts, and data processing.VariableInfo.from_col_name(col_name)to retrieve variables by column name.